<?php /* Smarty version Smarty-3.1.6, created on 2013-05-11 12:29:03
         compiled from "D:\Wamp\www\erp2.1\DzhPHP\FrameWork/Tpl\Import\index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:20655186119099a756-74565732%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'eaefe39cca0e49e6e8e4863592660c80a09f546d' => 
    array (
      0 => 'D:\\Wamp\\www\\erp2.1\\DzhPHP\\FrameWork/Tpl\\Import\\index.tpl',
      1 => 1368246537,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '20655186119099a756-74565732',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.6',
  'unifunc' => 'content_518611910f7db',
  'variables' => 
  array (
    'lang' => 0,
    'list' => 0,
    'key' => 0,
    'file_tocken' => 0,
    'sid' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_518611910f7db')) {function content_518611910f7db($_smarty_tpl) {?><?php if (!is_callable('smarty_function_wz')) include 'D:\\Wamp\\www\\erp2.1\\DzhPHP\\FrameWork\\Extend\\Vendor\\Smarty\\plugins\\function.wz.php';
?><?php echo smarty_function_wz(array(),$_smarty_tpl);?>

<script type="text/javascript">
$dom.find("input[type=button]").attr("disabled","disabled");
function submitImport(key,obj){
//	$.loading('<?php echo $_smarty_tpl->tpl_vars['lang']->value['submit_msg'];?>
');
	var in_type 	= $dom.find("input[type='radio'][name='"+key+"_type']:checked").val();
	var file_name	= $(obj).parent('td').find('#file_name').val();
	$.getJSON(APP+'/Ajax/imporExcel/key/'+key+'/file/'+file_name+'/in_type/'+in_type,function(result){  
		$.removeLoading();
		$("<div>"+result.msg+"</div>").dialog({
			buttons: {
				Ok: function() {
					$( this ).dialog( "close" );
					loadTab();
				}
			}
		});
		//reload
//		location.reload();
	}) 
	return true;
}
</script>

<table width="98%" id="" class="detail_list" border="1" cellpadding=0 cellspacing=0 ><tr class="row" >
<th><?php echo $_smarty_tpl->tpl_vars['lang']->value['module_name'];?>
</th><th><?php echo $_smarty_tpl->tpl_vars['lang']->value['import_type'];?>
</th><th><?php echo $_smarty_tpl->tpl_vars['lang']->value['file_name'];?>
</th><th><?php echo $_smarty_tpl->tpl_vars['lang']->value['improt'];?>
</th><th><?php echo $_smarty_tpl->tpl_vars['lang']->value['excel_download'];?>
</th></tr>
<?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['item']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
$_smarty_tpl->tpl_vars['item']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['item']->key;
?>
<tr>
<input type="hidden" name="module" value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
">
<td ><?php echo $_smarty_tpl->tpl_vars['lang']->value[strtolower($_smarty_tpl->tpl_vars['key']->value)];?>
</td>
<td >
<?php if ($_smarty_tpl->tpl_vars['key']->value=="District"||$_smarty_tpl->tpl_vars['key']->value=="FactoryIni"||$_smarty_tpl->tpl_vars['key']->value=="ClientIni"||$_smarty_tpl->tpl_vars['key']->value=="InitStorage"||$_smarty_tpl->tpl_vars['key']->value=="Stocktake"){?>
&nbsp;
<?php }else{ ?>
<input type="radio" id="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
_radio" name="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
_type" value="1" checked><?php echo $_smarty_tpl->tpl_vars['lang']->value['replace'];?>
 <input type="radio" name="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
_type" id="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
_radio" value="2"><?php echo $_smarty_tpl->tpl_vars['lang']->value['pass'];?>

<?php }?>
</td>
<td style="padding-top:3px;"><form><?php echo smarty_function_upload(array('tocken'=>$_smarty_tpl->tpl_vars['file_tocken']->value,'sid'=>$_smarty_tpl->tpl_vars['sid']->value,'type'=>10,'allowTypes'=>"csv"),$_smarty_tpl);?>
</form></td>
<td><input type="button" id="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
_submit" class="auditbutton" value="<?php echo $_smarty_tpl->tpl_vars['lang']->value['improt'];?>
" onclick="submitImport('<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
',this)"><input type="hidden" id="file_name"></td>
<td ><a href="<?php echo @EXCEL_PATH;?>
/<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
.xls"><?php echo $_smarty_tpl->tpl_vars['lang']->value['download'];?>
</a></td>
</tr>
<?php } ?>
</table>
<?php }} ?>